<div class="btn-group">
    <button id="refresh" class="btn btn-primary">刷新</button>
    <button id="lan" class="btn btn-success">LAN</button>
    <button id="wan" class="btn btn-danger">WAN</button>
</div>
<div id="network-root"></div>
<script type="text/javascript">
    $(document).ready(function () {

        $("button#refresh").click(function () {
            new Ajax("tab-item-init", "/itpkg/{{rid}}/network");
        });
        $("button#wan").click(function () {
            if(confirm("变更WAN信息之后需要切换物理线路，确认要继续么？")){
                new Ajax("network-root", "/itpkg/{{rid}}/network", "PUT", {act: "wan"})
            }

        });
        $("button#lan").click(function () {
            new Ajax("network-root", "/itpkg/{{rid}}/network", "PUT", {act: "lan"})
        });
    });
</script>